package com.neo.base.classTest

class Person(val firstName: String, val lastName: String) {
  private var position: String = _


   var positions: String = _

  println("Creating " + toString())

  def this (firstName: String, lastName: String, positionHeld: String) {
    this (firstName, lastName)
    position = positionHeld
  }

  override def toString() : String = {
    firstName + " " + lastName + " holds " + position + " position "
  }
}


object aaaa{
  def main(args: Array[String]): Unit = {
    val john = new Person("John", "Smith", "Analyst")
    println(john)
    val bill = new Person("Bill", "Walker")
    println(bill)


  }
}
